package icu.javacg.storage.controller;

import icu.javacg.storage.pojo.Area;
import icu.javacg.storage.service.AreaService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author sky
 * @date: 2023/4/18 15:53
 */

@RestController
@Tag(name = "测试")
public class TestController {

    @Resource
    private AreaService areaService;

    @GetMapping("/test")
    @Operation(summary = "测试")
    public String test() {
        return "test1";
    }

    @GetMapping("/getTest")
    public List<Area> getTest() {
        return areaService.list();
    }
}
